//q1a.cpp
//This program takes a number and print stars and spaces accordingly
//
//Binyamin 28 december 2017
//===========================================================================
#include<iostream>

using namespace std;

//1. Prompt the user for a number.
//2. capture the number.
//3. print stars and spaces accordingly.

int main()
{
	int num; //num - input from the user.
	int i; // i - a looper for the for loop.
	cout << "Please enter a number: ";
	cin >> num;
	for(i=1;i<=num;i++)
	{
		for(int k=1;k<=i;k++)
			cout << '*';
		for(int k= 2*num - 2*i;k>=1;k--)
			cout << ' ';
		for(int k=1;k<=i;k++)
			cout << '*';
		cout << endl;
	}
	return 0;
}
//output
//Please enter a number: 
//*        *
//**      **
//***    ***
//****  ****
//**********
